package com.yiwenup.exception.enums.basic;

import com.yiwenup.common.enums.basic.IEnum;
import com.yiwenup.exception.basic.BaseException;

/**
 * 异常枚举接口抽象
 **/
public interface IException extends IEnum {
    /**
     * 生成异常
     *
     * @return 异常数据
     */
    default BaseException exception(Object...args) {
        return new BaseException(this.getCode(), args);
    }
}
